import Home from '../components/Home.vue'
import Category from '../components/Category.vue'
import Cart from '../components/Cart.vue'
import GoodsDetail from '../components/GoodsDetail.vue'
import SearchPage from '../components/SearchPage.vue'
import Mine from '../components/Mine.vue'
import Login from '../components/Login.vue'
import Reg from '../components/Reg.vue'
import follow from '../components/payFollow.vue'
import account from '../components/account.vue'
import layout from '../layout'
let staticRoute = [
   {
    path: '/home',
    component: layout,
    children: [
        {
            path:'',
            component: Home
        }
    ]
}, {
    path: '/catgory',
    component:layout,
    children:[
        {
            path:'',
            component:Category
        }
    ]
}, {
    path: '/cart',
    component: layout,
    children:[
        {
            path:'',
            component: Cart
        }
    ]
}, {
    path: '/search',
    component:layout,
    children:[
        {
            path:'',
            component:SearchPage
        }
    ]
}, {
    path: '/mine',
    component:layout,
    children:[
        {
            path:'',
            component: Mine
        },
        {
            path:'history',
            component: follow
        },
        {
            path:'account',
            component: account
        }
    ]
}, {
    path: '/login',
    component: Login
}, {
    path: '/register',
    component:layout,
    children:[
        {
            path:'',
            component: Reg
        }
    ]
}, {
    path:'/follow',
    component:layout,
    children:[
        {
            path:'',
            component: follow
        }
    ]
},
{
    path: '/catgory/:id',
    component: Category
}, {
    path: '/detail',
    component: GoodsDetail
}, {
    path: '/',
    redirect: '/login'
}]
export default staticRoute